Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support naming migrations sequentially #2602

Merged
merged 3 commits into from
Jul 24, 2023
Merged

Support naming migrations sequentially #2602

merged 3 commits into from
Jul 24, 2023

Conversation

vmax
Copy link
Contributor

@vmax vmax commented Jul 8, 2023

Coming from Django migrations, I got used to migrations being named sequentially so I decided to implement support for it in sqlx. Timestamp-based naming stays as the default; sequential naming is enabled with -s flag to sqlx migrate add.

sqlx-cli/src/opt.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably important to actually document the inference behavior so people know about it.

Please check the comment on the first last suggestion (always forget they appear in order of creation) before applying it.

For good measure, I checked to make sure this renders well when running sqlx migrate add --help.

sqlx-cli/src/opt.rs Outdated Show resolved Hide resolved
sqlx-cli/src/opt.rs Outdated Show resolved Hide resolved
sqlx-cli/src/opt.rs Outdated Show resolved Hide resolved
@vmax
Copy link
Contributor Author

vmax commented Jul 21, 2023

@abonander thank you for doc suggestions; I applied them in https://github.com/vmax/sqlx/pull/2602/commits/b58fe54a4e84eb138ec8395fac966afbd169e96c

@abonander abonander merged commit f2bb464 into launchbadge:main Jul 24, 2023
57 checks passed
@vmax vmax deleted the feature/sequential-migration-naming branch July 25, 2023 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants